package com.aaa.controller;

import com.aaa.pojo.Goods;
import com.aaa.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/main")
public class MainController {
    @Autowired
    private GoodsService goodsService;

    @PostMapping("/findAllGoods")
    public List<Goods> findAllGoods(){
        return goodsService.findAllGoods();
    }
}
